package other.acm;


import java.util.Scanner;


public class sys1401 {

	
	public static boolean isSubSeq(String a,String b) {
		
		int inStrIndex = 0;
		int curIndex = -1;
		char ch;

		for (int i=0;i<a.length();i++) {
			ch = a.charAt(i);
			curIndex = b.indexOf(ch, inStrIndex);
			
			if (curIndex>=0) {
				inStrIndex = curIndex;
				continue;
			}
			else {
				return false;
			}
		}
		return true;
	}
	
	public static void main (String[] args){

		String inputStr;
		String[] strArray;
		String a;
		String b;

		Scanner sc = new Scanner(System.in);
		
		while(sc.hasNext())	{
			inputStr = sc.nextLine();
			strArray = inputStr.split(" ");
			
			a = strArray[0];
			b = strArray[1];
			
			if (isSubSeq(a,b)) {
				System.out.println("Yes");
			}
			else {
				System.out.println("No");
			}

		}
	}
}
